#include "StdAfx.h"
#include "base_buf.h"

namespace fly {

	namespace jld{

		namespace buffer {	

			base_buf::base_buf()
				:min_buf_size_(2)
				,header_size_(7)
			{
			}


			base_buf::~base_buf()
			{
				commit();
				consume();
			}

			const size_t& base_buf::header_size()
			{
				return header_size_;
			}
		
			asio::streambuf& base_buf::buf()
			{
				return buf_;
			}
			
			void base_buf::commit()
			{
				buf_.commit(buf_.size());
			}
			void base_buf::consume()
			{
				buf_.consume(buf_.size());
			}
		}
	}
}